package org.jeecg.modules.platform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 平台组织管理
 * @Author: jeecg-boot
 * @Date: 2024-10-25
 * @Version: V1.0
 */
@Data
@TableName("cy_platform_organization_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "cy_platform_organization_info对象", description = "平台组织管理")
public class CyPlatformOrganizationInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键/部门ID/组织ID")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
    private java.lang.String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
    /**
     * 组织名称
     */
    @Excel(name = "组织名称", width = 15)
    @ApiModelProperty(value = "组织名称")
    private java.lang.String name;
    /**
     * 组织备注
     */
    @Excel(name = "组织备注", width = 15)
    @ApiModelProperty(value = "组织备注")
    private java.lang.String remark;
    /**
     * 有效期
     */
    @Excel(name = "有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "有效期")
    private java.util.Date expire;
    /**
     * 是否核算主体
     */
    @Excel(name = "是否核算主体", width = 15)
    @ApiModelProperty(value = "核算主体数量")
    private java.lang.Integer costCalculationSubject;
    /**
     * 父类ID
     */
    @Excel(name = "父类ID", width = 15)
    @ApiModelProperty(value = "父类ID")
    private java.lang.String parentId;
    /**
     * 组织编码
     */
    @Excel(name = "组织编码", width = 15)
    @ApiModelProperty(value = "组织编码")
    private java.lang.String organizationCode;
    /**
     * 地址
     */
    @Excel(name = "地址", width = 15)
    @ApiModelProperty(value = "地址")
    private java.lang.String address;
    /**
     * 类型（个人、平台、园区）
     */
    @Excel(name = "类型（个人、平台、园区）", width = 15)
    @ApiModelProperty(value = "类型（个人、平台、园区）")
    @Dict(dicCode = "organization_type")
    private java.lang.Integer type;

    @ApiModelProperty("当前层级")
    private Integer level;

    @ApiModelProperty("允许层级")
    private Integer allowLevel;

    @ApiModelProperty("部门ID")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
    private String deptId;

    @TableField(exist = false)
    private List<CyPlatformOrganizationPermission> selectModules;

    @Dict(dicCode = "organization_state")
    private Integer state;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否需要弹窗提醒")
    private Boolean needCheck = true;

    @ApiModelProperty(value = "统一社会信用代码")
    private String unifiedSocialCreditIdentifier;

    @ApiModelProperty(value = "联系人")
    private String contactUser;
    @ApiModelProperty(value = "联系电话")
    private String contactNumber;
    @ApiModelProperty(value = "联系电话前缀")
    private String contactNumberPrefix;

    @ApiModelProperty(value = "联系邮箱")
    private String contactMail;

    @ApiModelProperty(value = "认证人")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    private String approveUser;

    @ApiModelProperty(value = "认证时间")
    private Date approveDate;

    @ApiModelProperty(value = "法定代表人")
    private String legalRepresentative;

    @ApiModelProperty(value = "成立时间")
    private String establishedTime;

    @ApiModelProperty(value = "行业")
    private String industry;

    @ApiModelProperty(value = "国家/地区")
    private String region;


    /**
     * 删除状态（0，正常，1已删除）
     */
    @Excel(name = "删除状态", width = 15, dicCode = "del_flag")
    @TableLogic
    private Integer delFlag;
}
